class NotificationPublisher < Facebooker::Rails::Publisher

# Send challenge via email
def challenge_email(ch)
  send_as :email
  recipients(ch.to_user_id.to_s)
  from(Facebooker::User.new(ch.from_user_id))
  title "You have received a 13wins challenge!"
  fbml render :partial=>'friends_bet/email',:locals=>{:ch=>ch} 
end

# Send challenge via Facebook notification
def challenge_notify(ch)
  send_as :notification
  recipients(ch.to_user_id.to_s)
  from(Facebooker::User.new(ch.from_user_id))
  fbml render :partial=>'friends_bet/notify',:locals=>{:ch=>ch} 
end
  
end
